<page-header-wrapper [title]="'订单明细'" [logo]="logo">
    <ng-template #logo>
        <button nz-button nz-tooltip nzTooltipTitle="返回上一页" (click)="goBack()">
            <i nz-icon nzType="left" nzTheme="outline"></i>
        </button>
    </ng-template>
</page-header-wrapper>

<nz-card class="statistics-box">
    <div nz-row nzGutter="8">
        <div nz-col [nzXl]="8" [nzLg]="12" [nzMd]="12" [nzSm]="24" [nzXs]="24" se-container [labelWidth]="150" col="1">
         
            <se label="网络货运人" [labelWidth]="133">
                {{headerInfo?.ltdidName}}
            </se>
          
            <se label="已开/全部订单数">
                {{headerInfo?.vatinvHNum}} / {{headerInfo?.ordlines}}
            </se>
            <se label="已开/全部发票金额">
                {{headerInfo?.vatinvHAmount |currency}} / {{headerInfo?.vatinvHNumAmount |currency}}
            </se>
            <se label="已开发票张数">
                {{headerInfo?.vatinvHNum}}
            </se>
            <se label="收件人">
                {{headerInfo?.reciname}}/{{headerInfo?.recitel}}
            </se>
            <se label="收件地址">
                {{headerInfo?.provinceName}}{{headerInfo?.cityName}}{{headerInfo?.areaName}}{{headerInfo?.reciaddr}}
            </se>
        </div>
        <div nz-col [nzXl]="8" [nzLg]="12" [nzMd]="12" [nzSm]="24" [nzXs]="24" se-container [labelWidth]="100" col="1">
            <se label="购买方">
                {{headerInfo?.artoName}}
            </se>
            <se label="纳税号">
                {{headerInfo?.taxNumber}}
            </se>
            <se label="申请编号">
                {{headerInfo?.vatappcode}}
            </se>
            <se label="地址">
                {{headerInfo?.registerAddr}}
            </se>
            <se label="电话">
                {{headerInfo?.registerPhone}}
            </se>
            <se label="开户行">
                {{headerInfo?.bankName}}
            </se>
            <se label="银行账户">
                {{headerInfo?.bankAccount}}
            </se>
        </div>
        <div nz-col [nzXl]="8" [nzLg]="12" nzMd="12" [nzSm]="24" [nzXs]="24" se-container [labelWidth]="100" col="1">
            <se label="服务名称">
                {{headerInfo?.vatnameLabel}}
            </se>
            <se label="销货清单">
                {{headerInfo?.isdetail?'是':'否'}}
            </se>
            <se label="其他要求">
                {{headerInfo?.otherremarks}}
            </se>
            <se label="票面备注">
                {{headerInfo?.vatremarks}}
                <!-- <p style="margin-bottom: 0;margin-top: 5px;">起运地:广东省深圳市南山区</p>
                <p style="margin-bottom: 0;">目的地:湖北省武汉市青山区</p>
                <p style="margin-bottom: 0;">货物名称:钢材</p>
                <p style="margin-bottom: 0;">车型车牌:高栏车 粤B36889</p> -->
            </se>
        </div>
    </div>
</nz-card>

<nz-card class="search-box" nzBordered>
    <div nz-row nzGutter="8">
        <div nz-col [nzXl]="_$expand ? 24 : 18" [nzLg]="24" [nzSm]="24" [nzXs]="24">
            <sf #sf [schema]="searchSchema"
                [ui]="{ '*': { spanLabelFixed: 90,grid: { lg: 8, md: 12, sm: 12, xs: 24 } }}" [compact]="true"
                [button]="'none'"></sf>
        </div>
        <div nz-col [nzXl]="_$expand ? 24 : 6" [nzLg]="24" [nzSm]="24" [nzXs]="24" [class.expend-options]="_$expand"
            class="text-right">
            <button nz-button nzType="primary" [nzLoading]="service.http.loading" (click)="st?.load(1)">查询</button>
            <button nz-button (click)="resetSF()">重置</button>
            <!-- <button nz-button> 导出</button> -->
            <button nz-button nzType="link" (click)="expandToggle()">
                {{ !_$expand ? '展开' : '收起' }}
                <i nz-icon [nzType]="!_$expand ? 'down' : 'up'"></i>
            </button>
        </div>
    </div>
</nz-card>

<nz-card class="content-box" nzBordered>
    <div class="d-flex align-items-center mb-md mt-sm" *ngIf="sts==='1'">
        <button nz-button (click)="openRequestedModal('1')">全部开票</button>
        <button nz-button (click)="openRequestedModal('2')">开票</button>
        <!-- <button nz-button (click)="removeOrder()">移除</button> -->
        <div class="ml-md">
            已选择
            <strong class="text-red">{{ selectedRows.length }}</strong> 条数据&nbsp;&nbsp; 开票金额总计 <strong
                class="text-red">{{
                totalCallNo |currency }}</strong>
            <a *ngIf="selectedRows.length > 0" (click)="st.clearCheck();totalCallNo='0'" class="ml-lg">清空</a>
        </div>
    </div>

    <st #st [data]="service.$api_get_invoice_requested_order_detail" [columns]="columns" [req]="{ process: beforeReq }"
        [page]="{}" [res]="{ process: afterRes }" [loading]="false" [scroll]="{ x:'1200px',y: '200px' }"
        (change)="stChange($event)">
        <ng-template st-row="billHCode" let-item let-index="index" let-column="column">
            <a class="text-primary" (click)="routeToOrder(item)"> {{ item.billHCode }}</a>
        </ng-template>
    </st>
</nz-card>